import axios from '@/libs/api.request'
import { getToken } from '@/libs/util'
// =============== news-system/advertisements/list.vue =========================
let auth_token = getToken();
//优惠券
export const getTableData = (page_current, page_size, searchData) => {
  return axios.request({
    url: 'api/v1.cuser.act/p_index',
    params: {
      page_current: page_current,
      page_size: page_size,
      auth_token:auth_token,
      status :searchData.status,
    },
    method: 'get'
  })
}


export const getInfo = (a_relation_id) => {
  return axios.request({
    url: 'api/v1.cuser.act/p_read',
    params: {
      a_relation_id: a_relation_id,
      auth_token:auth_token,
    },
    method: 'get'
  })
}

export const getTpl = (a_relation_id) => {
  return axios.request({
    url: 'api/v1.cuser.act/p_tpl_read',
    params: {
      a_relation_id: a_relation_id,
      auth_token:auth_token,
    },
    method: 'get'
  })
}


//筛选数据
export const getData = () => {
  return axios.request({
    url: 'api/v1.cuser.index/get_data',
    params: {
      auth_token:auth_token,
    },
    method: 'get'
  })
}

export const pApply = (formData) => {
 formData.auth_token = auth_token;
	
  return axios.request({
    url: 'api/v1.cuser.act/p_apply',
    data:formData,
    method: 'post'
  })
}
